<template>
	<view class="wuliu">
		<view class="box">
			<view class="box-left">
				<text class="box-left-text">{{data?data.shipperName : ''}}</text>
				<text class="box-left-text1">{{data?data.shipperSn : ''}}</text>
			</view>
			<view class="box-right" @click="copyNumHandle">
				复制
			</view>
		</view>
		<view class="box1">
			<view class="box-item" v-for="(item,index) in data.dataList" :key="index">
				<view :class="index===0?'active-dian' : 'dian'"></view>
				<view class="content">
					<view class="content-view">
						<!-- <text :class="index===0?'active-content-view-text' : 'content-view-text'">{{item.title}}</text> -->
						<text :class="index===0?'active-content-view-text1' : 'content-view-text1'">{{item.ftime}}</text>
					</view>
					<view :class="index===0?'active-content-view1' : 'content-view1'">
						{{item.context}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[{
					date:'12-12 18:22',
					content:'【合肥市】已到达 安徽合肥分拨交付中心',
					title:'运输中 '
				},{
					date:'12-12 10:42',
					content:'快递员已揽件',
					title:'已揽件 '
				}],
				orderId:'',
				data:'',
				share:uni.getStorageSync('share')
				
			}
		},
		onLoad(options) {
			this.orderId = options.orderId
			this.getqueryLogistics()
		},
		methods: {
			//物流
			async getqueryLogistics(){
				const params = {
					orderId:this.orderId
				}
				const res  = await this.$u.api.queryReturnLogistics(params)
				this.data = res.data
				console.log(res)
			},
			//复制
			copyNumHandle(){
				uni.setClipboardData({
					data: this.data.shipperSn, // data的值为你要复制的内容
					success: (res) => {
						this.$u.toast('复制成功')
					}
				});
			},
		}
	}
</script>

<style>
	page{
		background: white;
	}
</style>
<style scoped lang="scss">
    .box{
		padding: 24rpx 28rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.box-left{
		display: flex;
		flex-direction: row;
		align-items: center;
	}
	.box-left-text{
		font-size: 28rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #000000;
		line-height: 32rpx;
	}
	.box-left-text1{
		margin-left: 20rpx;
		font-size: 24rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #000000;
		line-height: 28rpx;
	}
	.box-right{
		width: 64rpx;
		height: 34rpx;
		background: #5D22BA;
		font-size: 22rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #ffffff;
		line-height: 34rpx;
		text-align: center;
	}
	.box1{
		padding: 28rpx;
	}
	.box-item{
		display: flex;
		flex-direction: row;
		padding: 24rpx 0rpx;
	}
	.active-dian{
		width: 12rpx;
		height: 12rpx;
		background: #000000;
		border-radius: 50%;
		margin-top: 14rpx;
	}
	.dian{
		width: 12rpx;
		height: 12rpx;
		background: #333333;
		border-radius: 50%;
		margin-top: 14rpx;
	}
	.content{
		margin-left: 16rpx;
		flex: 1;
	}
	.content-view{
		display: flex;
		flex-direction: row;
		align-items: center;
	}
	.content-view-text{
		font-size: 32rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #999999;
		line-height: 38rpx;
	}
	.content-view-text1{
		//margin-left: 10rpx;
		font-size: 24rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: 400;
		color: #999999;
		line-height: 28rpx;
	}
	.active-content-view-text{
		font-size: 32rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #000000;
		line-height: 38rpx;
	}
	.active-content-view-text1{
		//margin-left: 10rpx;
		font-size: 24rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: 400;
		color: #333333;
		line-height: 28rpx;
	}
	.active-content-view1{
		margin-top: 18rpx;
		font-size: 24rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #333333;
		line-height: 28rpx;
	}
	.content-view1{
		margin-top: 18rpx;
		font-size: 24rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
		line-height: 28rpx;
	}
</style>
